package temporadas;

import java.util.ArrayList;
import java.util.List;

public class Temporada {
	private String url;
	private String agno;
	private String division;
	private List<Jornada> jor;
	
	public Temporada(String s, String agno, String division) {
		super();
		this.agno = agno;
		this.division = division;
		this.url=s;
		jor=new ArrayList<Jornada>();
				
		for (int i=1;i<=42;i++){
			
			Integer nj=new Integer(i);
			String aux=this.getUrl()+ nj.toString();	
			try {
				Jornada j=new Jornada(aux);
				jor.add(j);
				aux="";
				}
			catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			if (i==38 && division.equals("primera"))
				break;
		}
	}
		

	public String getUrl() {
		return url;
	}


	public void setUrl(String url) {
		this.url = url;
	}


	public String getAgno() {
		return agno;
	}

	public void setAgno(String agno) {
		this.agno = agno;
	}

	public String getDivision() {
		return division;
	}

	public void setDivision(String division) {
		this.division = division;
	}

	public List<Jornada> getJor() {
		return  jor;
	}

	public void setJor(List<Jornada> jor) {
		this.jor = jor;
	}
	
	
	
}
